﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace CustomWindows
{
    public static class Helpers
    {
        public static Process GetProcess(IntPtr hwnd)
        {
            return Process.GetProcesses()
                .Where(x => x.MainWindowHandle == hwnd)
                .SingleOrDefault();
        }

    }
}
